import Vue from 'vue'
import App from './App.vue'

import MyGoodsList from './components/MyGoodsList.vue'
import MyUserInfo from './components/MyUserInfo.vue'
import MyGoodsSearch from './components/MyGoodsSearch.vue'
import FOF from './components/pages/FOF.vue'

import axios from 'axios'
import VueRouter from 'vue-router'

import 'bootstrap/dist/css/bootstrap.css'
import './assets/fonts/iconfont.css'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'MyGoodsList',
    component: MyGoodsList,
  },
  {
    path: '/MyGoodsList',
    name: 'MyGoodsList',
    component: MyGoodsList,
  },
  {
    path: '/MyUserInfo',
    name: 'MyUserInfo',
    component: MyUserInfo,
  },
  {
    path: '/MyGoodsSearch',
    name: 'MyGoodsSearch',
    component: MyGoodsSearch,
  },
  {
    path: '*',
    component: FOF,
  },
]

const router = new VueRouter({
  routes,
})

axios.defaults.baseURL = 'https://www.escook.cn'

Vue.prototype.$axios = axios

Vue.config.productionTip = false

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app')
